From 0ba6028da4bc6113eeadd8601cb8fdf2154d952e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 29 Aug 2008 22:21:32 +0000 Subject: [PATCH] =?utf8?q?Bug=20437791=20=E2=80=93=20Animation=20is=20play?= =?utf8?q?ed=20at=20the=20wrong=20speed?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-08-29 Björn Lindqvist Bug 437791 – Animation is played at the wrong speed * gdk-pixbuf/io-gif.c (gif_get_lzw): Better 100 ms timeout for broken GIFs with 0 frame timeout. svn path=/trunk/; revision=21242 --- ChangeLog | 7 +++++++ gdk-pixbuf/io-gif.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b48938557d..77ae1fda06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-29 Björn Lindqvist + + Bug 437791 – Animation is played at the wrong speed + + * gdk-pixbuf/io-gif.c (gif_get_lzw): Better 100 ms timeout for + broken GIFs with 0 frame timeout. + 2008-08-29 Christian Dywan Bug 549810 – Memory leaks in printing code diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index ef5a7213fb..0a5803fb0c 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -874,10 +874,14 @@ gif_get_lzw (GifContext *context) /* GIF delay is in hundredths, we want thousandths */ context->frame->delay_time = context->gif89.delay_time * 10; - /* Some GIFs apparently have delay time of 0, - * that crashes everything so set it to "fast". - * Also, timeouts less than 20 or so just lock up - * the app or make the animation choppy, so fix them. + /* GIFs with delay time 0 are mostly broken, but they + * just want a default, "not that fast" delay. + */ + if (context->frame->delay_time == 0) + context->frame->delay_time = 100; + + /* No GIFs gets to play faster than 50 fps. They just + * lock up poor gtk. */ if (context->frame->delay_time < 20) context->frame->delay_time = 20; /* 20 = "fast" */ -- 2.30.2